// 接口
public interface UserService {
    public ArrayList<User> findAll();
}

// 实现类
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public ArrayList<User> findAll() {
        return userMapper.selectAll();
    }
}